Dynamic Reporting

Workshop at the UZH Reproducibility Day 2023

Samuel Pawel and Felix Hofmann

Center for Reproducible Science (CRS)

Schedule

  1. What is dynamic reporting?

  2. How to do dynamic reporting?

  3. Hands-on hacking

Manual reporting workflow

What are the disadvantages?

  • tedious and error-prone
  • not directly reproducible
  • difficult to share/reuse
  • need to repeat if new data

Dynamic reporting workflow

R Markdown

  • R programming language
    (> 60 other also possible)

  • .Rmd files

  • Markdown text markup language

  • HTML, PDF, DOCX output formats (and more)

Jupyter Notebooks

  • Programming language: Python
    (> 100 other possible)

  • Markup language: Markdown

  • HTML, PDF output formats (and more)

Quarto

  • Programming language: R, Python, Julia

  • Markup language: Markdown

  • Evolution of R Markdown

  • HTML, PDF, DOCX output formats (and more)

knitr

  • Programming language: R
    (> 60 other also possible)

  • Markup languages: LaTeX
    (+ HTML, Markdown, and more)

  • HTML, PDF, DOCX output formats (and more)

  • steeper learning curve

Which tool for whom?

  • R Markdown → established, simple, for R
  • knitr → established, complex, for R
  • Jupyter Notebooks → established, for Python and Julia, not very good for dynamic reporting
  • Quarto → new, simple, for all R, Python and Julia

Useful references

Exercises

  1. Download the data sets from https://github.crsuzh/dynamicReporting/XXXXX

  2. Produce a dynamic report with the tool of your choice. Use the data from 2020 to compute …. Make a chart of …. Automate

  3. Now use the data from 2020 and 2021 and rerun your analysis